package com.sms.service.impl;

import com.sms.dao.ClassInfoMapper;
import com.sms.pojo.ClassInfo;
import com.sms.service.ClassInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lhj
 */
@Service
public class ClassInfoServiceImpl implements ClassInfoService {
    @Autowired
    private ClassInfoMapper classInfoMapper;
    @Override
    public Integer insertClass(ClassInfo classInfo) {
        Integer row = classInfoMapper.insertClass(classInfo);
        return row;
    }

    @Override
    public Integer updateClass(ClassInfo classInfo) {
        Integer row = classInfoMapper.updateClass(classInfo);
        return row;
    }

    @Override
    public Integer deleteClass(Integer classId) {
        Integer row = classInfoMapper.deleteClass(classId);
        return row;
    }

    @Override
    public List<ClassInfo> selectClassAll() {
        List<ClassInfo> classInfoList = classInfoMapper.selectClassAll();
        return classInfoList;
    }

    @Override
    public ClassInfo selectClassOne(Integer classId) {
        ClassInfo classInfo = classInfoMapper.selectClassOne(classId);
        return classInfo;
    }
}
